//package com.inspur.edp.udt.generator.api.typeprocessers.datareaders;
//
//import Inspur.Gsp.Caf.Generator.BaseInfoItem.*;
//import Inspur.Gsp.Caf.Generator.ClassGenerator.*;
//import Inspur.Gsp.Caf.Generator.Utils.*;
//import Inspur.Gsp.Cef.Repository.DbPropertyConvertors.*;
//import Inspur.Gsp.Udt.DesignTime.Api.Entity.*;
//import Microsoft.CodeAnalysis.CSharp.*;
//import Microsoft.CodeAnalysis.CSharp.Syntax.*;
//import com.inspur.edp.udt.generator.UdtGeneratorContext;
//
//public class DbPropertyConvertorsReadDataGenerator extends UdtDataReaderReadDataMethodGenerator
//{
//	private String propertyName;
//	private String columnName;
//	private String convertosMethodName;
//	private UdtGeneratorContext udtGenCtx;
//	public DbPropertyConvertorsReadDataGenerator(UdtGeneratorContext udtGenCtx, String propertyName, String columnName, String convertosMethodName)
//	{
//		super();
//		this.udtGenCtx = udtGenCtx;
//		this.propertyName = propertyName;
//		this.columnName = columnName;
//		this.convertosMethodName = convertosMethodName;
//	}
////        void ReadData(ref ICefData data, ICefReader reader)
////        {
////           object value = reader.ReadValue("xxx");
////           data.Value= DbPropertyConvertors.ConvertVarcharToString(value);
////        }
////
//	@Override
//	protected BlockSyntax BuildMethodBody()
//	{
//		return SyntaxFactory.Block(SyntaxFactory.LocalDeclarationStatement(SyntaxFactory.VariableDeclaration(TypeUtils.GetTypeSyntax(udtGenCtx.RootDataInterfaceType)).
//				WithVariables(SyntaxFactory.<VariableDeclaratorSyntax>SingletonSeparatedList(
//						SyntaxFactory.VariableDeclarator(SyntaxFactory.Identifier("cdata")).
//								WithInitializer(SyntaxFactory.EqualsValueClause(SyntaxFactory.BinaryExpression(SyntaxKind.AsExpression, SyntaxFactory.IdentifierName("data")
//										, TypeUtils.GetTypeSyntax(udtGenCtx.RootDataInterfaceType))))))),
//				SyntaxFactory.LocalDeclarationStatement(SyntaxFactory.VariableDeclaration(SyntaxFactory.PredefinedType(SyntaxFactory.Token(SyntaxKind.ObjectKeyword))).WithVariables(SyntaxFactory.<VariableDeclaratorSyntax>SingletonSeparatedList(SyntaxFactory.VariableDeclarator(SyntaxFactory.Identifier("propertyValue")).WithInitializer(SyntaxFactory.EqualsValueClause(SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.IdentifierName("reader"), SyntaxFactory.IdentifierName("ReadValue"))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.LiteralExpression(SyntaxKind.StringLiteralExpression, SyntaxFactory.Literal(columnName))))))))))), SyntaxFactory.ExpressionStatement(SyntaxFactory.AssignmentExpression(SyntaxKind.SimpleAssignmentExpression, SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, SyntaxFactory.IdentifierName("cdata"), SyntaxFactory.IdentifierName(propertyName)), SyntaxFactory.InvocationExpression(SyntaxFactory.MemberAccessExpression(SyntaxKind.SimpleMemberAccessExpression, TypeUtils.GetTypeSyntax(DbPropertyConvertors.class), SyntaxFactory.IdentifierName(convertosMethodName))).WithArgumentList(SyntaxFactory.ArgumentList(SyntaxFactory.<ArgumentSyntax>SingletonSeparatedList(SyntaxFactory.Argument(SyntaxFactory.IdentifierName("propertyValue"))))))));
//	}
//}